import request from '@/utils/request'

export function getAgents(query) {
  return request({
    url: '/distribution/agent/getList',
    method: 'post',
    data: query
  })
}

export function getAgentDetail(id) {
  return request({
    url: '/distribution/agent/getDetail',
    method: 'post',
    data: id
  })
}

export function saveAgent(formdata) {
  return request({
    url: '/distribution/agent/save',
    method: 'post',
    data: formdata
  })
}
export function changeStatusByAgentID(id) {
  return request({
    url: '/distribution/agent/change-status',
    method: 'post',
    data: id
  })
}

export function removeAgentByID(id) {
  return request({
    url: '/distribution/agent/remove',
    method: 'post',
    data: id
  })
}

export function fetchAgentAvailable() {
  return request({
    url: '/distribution/agent/getAvailable',
    method: 'post'
  })
}

